﻿Imports Microsoft.VisualBasic
Imports System.ServiceModel


Namespace DotNetNuke.Modules.IWebCF

    <MessageContract()> _
    Public Class IWebRequest
        Private _header As New IWebAuthenticationHeader

        Public Sub New()

        End Sub

        Public Sub New(ByVal header As IWebAuthenticationHeader)
            Me.Header = header

        End Sub

        <MessageHeader()> _
        Public Property Header() As IWebAuthenticationHeader
            Get
                Return Me._header
            End Get
            Set(ByVal value As IWebAuthenticationHeader)
                Me._header = value
            End Set
        End Property

    End Class

    <MessageContract()> _
    Public Class IWebRequest(Of P1)

        Private _header As New IWebAuthenticationHeader
        Private _parameter1 As P1

        Public Sub New()

        End Sub

        Public Sub New(ByVal header As IWebAuthenticationHeader, ByVal param1 As P1)

            Me.Header = header
            Me.Parameter1 = param1

        End Sub

        <MessageHeader()> _
        Public Property Header() As IWebAuthenticationHeader
            Get
                Return Me._header
            End Get
            Set(ByVal value As IWebAuthenticationHeader)
                Me._header = value
            End Set
        End Property

        <MessageBodyMember()> _
        Public Property Parameter1() As P1
            Get
                Return _parameter1
            End Get
            Set(ByVal value As P1)
                _parameter1 = value
            End Set
        End Property

    End Class

    <MessageContract()> _
    Public Class IWebRequest(Of P1, P2)
        Inherits IWebRequest(Of P1)

        Private _parameter2 As P2

        Public Sub New(ByVal header As IWebAuthenticationHeader, ByVal param1 As P1, ByVal param2 As P2)

            MyBase.New(header, param1)

            Me.Parameter2 = param2

        End Sub

        <MessageBodyMember()> _
        Public Property Parameter2() As P2
            Get
                Return _parameter2
            End Get
            Set(ByVal value As P2)
                _parameter2 = value
            End Set
        End Property

    End Class

    <MessageContract()> _
    Public Class IWebResponse(Of T)
        Private _value As T

        Public Sub New()

        End Sub

        Public Sub New(ByVal value As T)
            Me._value = value

        End Sub

        <MessageBodyMember()> _
        Public Property Value() As T
            Get
                Return _value
            End Get
            Set(ByVal value As T)
                _value = value
            End Set
        End Property

    End Class



End Namespace
